/*
 * @Description: 档案征集整体结构
 * @Author: Zzt
 * @Date: 2022-12-28 11:22:27
 * @LastEditTime: 2022-12-28 11:26:15
 */

import { ReactNode } from 'react';
import CommonTableList, { ICommonTableListProps } from './CommonTableList';
import cs from 'classnames';
import { Button, Divider, Space, Typography } from 'antd';

interface ICommonTableWrapProps extends ICommonTableListProps {
  title: string;
  operates?: ReactNode;
}

const CommonTableWrap = (props: ICommonTableWrapProps) => {
  const {
    title,
    operates,
    list,
    fieldList,
    actions,
    pagination,
    loading,
    selectItems,
    setSelectedItem,
    selectChange
  } = props;

  return (
    <>
      <div className={cs('filter-container', 'page-operate')}>
        <Typography.Title level={5}>{title}</Typography.Title>
        {operates}
      </div>

      <CommonTableList
        actions={actions}
        list={list}
        fieldList={fieldList}
        loading={loading}
        selectItems={selectItems}
        setSelectedItem={setSelectedItem}
        pagination={pagination}
        selectChange={selectChange}
      />
    </>
  );
};
export default CommonTableWrap;
